from superdice.libs.diceConfigs import configFile
from superdice.superdice import registerRoll, unregisterRoll

def es_map_start(ev):
    cfgData.execute()

def unload():
    unregisterRoll(diceRoll)

def diceRoll(userid, player, eplayer):
    player.speed += float(speedgain)

cfgData = configFile('dice_speedgain')
speedgain = cfgData.cvar('superdice_cfg_speedgain_speed', 0.4, 'How much speed does the player gain?')
cfgData.write()
cfgData.execute()

registerRoll(diceRoll, 'speedgain')
